/*
* 苏州海管家物流科技有限公司（https://www.hgj.com/）.
* 苏公网安备32059002003385号 © 2015-2022 Hgj.com All Rights Reserved. | 苏ICP备15030950号.
* @Date: 2022.04.04.
* @Author
* @Description 企点管理后台 - 项目入口.
**/
<script setup lang="ts">

import Cookies from 'js-cookie'
import AsideBar from './layout/AsideBar/index.vue'
// import HeaderBar from './layout/HeaderBar/index.vue'

import zhCn from 'element-plus/lib/locale/lang/zh-cn'

import router from '@/router/index'
import { useStore } from '@/store'

const { routes } = router.options
console.log('app-routes===================', routes)

Cookies.set('manager_session_id', '6cf08418271f48a0a5a9a1fd09dce5b4')

// 触发 Cookies
const store = useStore()
console.log('store==================', store)

store.dispatch('fetchUserInfo')
// this.$store.dispatch('fetchUserInfo')

</script>

<template>
  <el-config-provider :locale="zhCn">
    <header class="app-header">
      占位
    </header>

    <article class="flex h100">
      <!--  左侧导航  -->
      <AsideBar :menu-list="routes" />
      <!-- 主体 -->
      <section class="app-view">
        <div class="app-container">
          <!-- 头部 -->
          <!--          <HeaderBar />-->

          <!--          {{ $t("message.hello") }}-->
          <!--          {{ t("message.hello") }}-->

          <router-view />
        </div>
      </section>
    </article>
  </el-config-provider>
</template>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
.fl {
  float: left;
}
.fr {
  float: right;
}
.flex {
  display: flex;
}
.grey-bor {
  border: 1px solid var(--el-border-color-lighter)
}
#app {
  height: 100vh;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
  background: #f8f8f8;
  border: 1px solid yellow;
}
.h100 {
  height: 90%;
}

.app-view {
  width: 100%;
  border: 1px solid red;

}
.app-container {
  margin-left: 10px;
}
// 占位
.app-header {
  height: 20px;
  border: 1px solid red;
}
</style>


